package com.apes.scm.rcl.service;

import com.apes.framework.api.DomainService;
import com.apes.framework.plugin.esb.api.SimpleRequest;
import com.apes.scm.rcl.model.RclInst;
import com.apes.scm.rcl.repository.RclInstRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName RclInstService
 * @Description TODO
 * @Author pengyb
 * @Date 2019/12/6 17:00
 * @Version 1.0
 **/
@Service("rclInstService")
public class RclInstService extends DomainService {
    @Autowired
    private RclInstRepository rclInstRepository;

    public RclInst save(SimpleRequest request) {
        RclInst inst = request.getO(RclInst.class);
        return rclInstRepository.save(inst);
    }

    public String delete(SimpleRequest request) {
        RclInst inst = request.getO(RclInst.class);
        rclInstRepository.delete(inst);
        return "删除成功";
    }
}
